#引入需要的模块
import urllib
from urllib import request
url='https://www.jd.com'
headers={
    'User-Agent':'Mozilla/5.0 (compatible; MSIE 5.5; Windows NT)'
}
req=urllib.request.Request(url,headers=headers)
r = urllib.request.urlopen(req)
content = r.read().decode('utf-8')
print(content)

